package nl.xs4all.dylanschell.deckprinter;

import com.google.inject.servlet.ServletModule;
import nl.xs4all.dylanschell.deckprinter.guice.WicketGuiceFilter;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.protocol.http.WicketFilter;

import java.util.HashMap;
import java.util.Map;

public class WebModule extends ServletModule
{

    @Override
    protected void configureServlets()
    {
        bind(WebApplication.class).toProvider(WicketGuiceAppProvider.class);
        Map<String, String> params = new HashMap<String, String>();
        params.put(WicketFilter.FILTER_MAPPING_PARAM, "/*");
        filter("/*").through(WicketGuiceFilter.class, params);
    }
}